package com.chd.driversystem.domain;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Index;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Transient;

import java.util.Date;

/**
 * Created by shawnfly on 17-5-2.
 */
@Entity(indexes = {@Index(value = "id ASC",unique = true)})
public class Evaluation {

    @Transient
    public static final int DAY_EVALUATION = 1;
    @Transient
    public static final int WEEK_EVALUATION = 2;
    @Transient
    public static final int MONTH_EVALUATION = 3;

    @Id(autoincrement = true)
    private Long id;
    @NotNull
    private Long userId;
    @NotNull
    private Integer type;     //测评种类
    @NotNull
    private Date createDate;  //创建时间
    private Integer stability;//稳定性得分
    private Integer opSpec;//操作规范得分
    private Integer vehHealth;//车辆健康得分
    private Integer drExpericen;//驾驶经验得分
    private Integer esDriving;//节能驾驶得分
    private Integer tScore;//综合评分
    private Integer range;  //排名
    @Generated(hash = 799741937)
    public Evaluation(Long id, @NotNull Long userId, @NotNull Integer type,
            @NotNull Date createDate, Integer stability, Integer opSpec,
            Integer vehHealth, Integer drExpericen, Integer esDriving,
            Integer tScore, Integer range) {
        this.id = id;
        this.userId = userId;
        this.type = type;
        this.createDate = createDate;
        this.stability = stability;
        this.opSpec = opSpec;
        this.vehHealth = vehHealth;
        this.drExpericen = drExpericen;
        this.esDriving = esDriving;
        this.tScore = tScore;
        this.range = range;
    }
    @Generated(hash = 1594874669)
    public Evaluation() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return this.userId;
    }
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Integer getType() {
        return this.type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public Date getCreateDate() {
        return this.createDate;
    }
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    public Integer getStability() {
        return this.stability;
    }
    public void setStability(Integer stability) {
        this.stability = stability;
    }
    public Integer getOpSpec() {
        return this.opSpec;
    }
    public void setOpSpec(Integer opSpec) {
        this.opSpec = opSpec;
    }
    public Integer getVehHealth() {
        return this.vehHealth;
    }
    public void setVehHealth(Integer vehHealth) {
        this.vehHealth = vehHealth;
    }
    public Integer getDrExpericen() {
        return this.drExpericen;
    }
    public void setDrExpericen(Integer drExpericen) {
        this.drExpericen = drExpericen;
    }
    public Integer getEsDriving() {
        return this.esDriving;
    }
    public void setEsDriving(Integer esDriving) {
        this.esDriving = esDriving;
    }
    public Integer getTScore() {
        return this.tScore;
    }
    public void setTScore(Integer tScore) {
        this.tScore = tScore;
    }
    public Integer getRange() {
        return this.range;
    }
    public void setRange(Integer range) {
        this.range = range;
    }

    @Override
    public String toString() {
        return "Evaluation{" +
                "id=" + id +
                ", userId=" + userId +
                ", type=" + type +
                ", createDate=" + createDate +
                ", stability=" + stability +
                ", opSpec=" + opSpec +
                ", vehHealth=" + vehHealth +
                ", drExpericen=" + drExpericen +
                ", esDriving=" + esDriving +
                ", tScore=" + tScore +
                ", range=" + range +
                '}';
    }
}
